//
// Created by tan on 22-8-25.
//

#ifndef PCB_BASEDATA_H
#define PCB_BASEDATA_H

#include "GPoint.h"
#include "DataCtrl.h"


class SGPoints {
    /**
     * G01C line 0
     * G03R rectangle 1
     * G03C circle 2
     * G03O oval 3
     * G36 surface
     * G04 pad
     * **/
public:
    int n; // total points
    vector<GPoint> points;
};


class SGLines {
public:
    int n;   //total lines
    int maxIndex;
    GLine *nIdx;
    SGLines(const DataCtrl &dataCtrl);

};

class SGPads {
public:
    int n;   //total pads
    int *ni;  // points in pad i
    int *ni_idx;
    double **points;
};


class SGSurfaces {
public:
    int n;   //total surfaces
    int *ni;  // points in surface i
    int *ni_idx;
    double **points;
};

class SGBlocks {
//undefined
    int n;
    int **ni_lines; // type, number
    int *lines;
};

SGPoints createSGPoints(const DataCtrl &dataCtrl);

SGLines createLines(const DataCtrl &dataCtrl);

#endif //PCB_BASEDATA_H
